home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Development
/
General
/
ViewIt™ 2.24 Shareware
/
C++ Demo Projects
/
Metrowerks C++ 1.0a4 Demos
/
TutorialMC+.cp
< prev
next >
Wrap
Text File
|
1994-03-02
|
1KB
|
52 lines
/* Tutorial MC+ Demonstration Program */
/* ©FaceWare 1993-94. All Rights Reserved. */
#include <string.h>
#include "FaceStorMC+.h"
extern struct FaceRec fRec;
short theFlag,theListItem,theMenuItem;
char theString[32];
void main()
{
strcpy(fRec.uName, "Tutorial.Rsrc");
FaceIt(0,DoInit);
theFlag = 0;
theListItem = 3;
theMenuItem = 2;
strcpy(theString,"Hello");
for (;;) {
FaceIt(0,DoLoop);
if ((fRec.uMenuID == 105)&&(fRec.uMenuItem == 1))
{
FaceIt(0,NewWnd,1010);
FaceIt(0,GetCtl,1010,0,1,3);
FaceIt(0,LnkCtl,(long)fRec.cControl,(long)&theFlag,2);
FaceIt(0,GetCtl,1010,0,1,4);
FaceIt(0,LnkCtl,(long)fRec.cControl,(long)theString,-31);
FaceIt(0,GetCtl,1010,0,1,5);
FaceIt(0,LnkCtl,(long)fRec.cControl,(long)&theListItem,2);
FaceIt(0,GetCtl,1010,0,1,6);
FaceIt(0,LnkCtl,(long)fRec.cControl,(long)&theMenuItem,2);
FaceIt(0,SetVal,1010);
for (;;) {
FaceIt(0,MdlWnd,1010);
if (fRec.uMenuID == 1010) {
if (fRec.wcHit == -1)
break;
else if (fRec.wcHit == 1) {
FaceIt(0,GetVal,1010);
break;
}
else if (fRec.wcHit == 2) {
FaceIt(0,GetCtl,1010,0,1,8);
strcpy(fRec.uString,"Run button was hit.");
FaceIt(fRec.cControl,1565,2);
}
}
}
FaceIt(0,EndWnd,1010);
}
}
}